package top.hekun.study.core.visitor.method.simple;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;

/**
 * 更改类名 方便调试
 *
 * @Author: 贺坤
 * @Date: 2023/5/10 10:08
 */
public class MyClassVisitorModifyMethodCode0 extends ClassVisitor {
    private int apiVersion;
    private String thisClassName = this.getClass().getSimpleName();

    public MyClassVisitorModifyMethodCode0(int apiVersion, ClassVisitor classVisitor) {
        super(apiVersion, classVisitor);
        this.apiVersion = apiVersion;
    }

    @Override
    public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
        System.out.println(name);
        super.visit(version, access, " top/hekun/study/classFileModel/HelloWordModifyMethodCodeModifyClass", signature, superName, interfaces);
    }
}
